import {changePwd, userLogout, agentDetail, cashRecord, getCash, getAgentDetail, userUpdatePwd} from '@/api/infoApi'
const info = {
    namespaced: true,
    state: {
        
    },
    getters: {
      
    },
    mutations: { 
    },
    actions: { 
        ChangePwd ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                changePwd(params).then(res => {
                    resolve(res)
                })
            })
        },
        UserLogout ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                userLogout(params).then(res => {
                    resolve(res)
                })
            })
        },
        AgentDetail ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                agentDetail(params).then(res => {
                    resolve(res)
                })
            })
        },
        CashRecord ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                cashRecord(params).then(res => {
                    resolve(res)
                })
            })
        },
        GetCash ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                getCash(params).then(res => {
                    resolve(res)
                })
            })
        },
        GetAgentDetail ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                getAgentDetail(params).then(res => {
                    resolve(res)
                })
            })
        },
        UserUpdatePwd ({state, commit, dispatch}, params) {
            return new Promise((resolve, reject) => {
                userUpdatePwd(params).then(res => {
                    resolve(res)
                })
            })
        }
    }
}
export default info